import Home from '../views/home' //主文件入口
import MyPage from '../views/my/myPage.vue' //view文件入口
// meta:{
// 	xtab:false,//是否隐藏底部导航
// 	xheader:true,//是否隐藏头部header
// 	xtitle:true,//是否隐藏头部header标题
// 	xpage:2,//页面层级1--1级页面2--2级页面
// 	xclass:'order'//动态class用户切换导航的主题颜色
// },
var routes = [{
		path: '/login',
		component: (resolve) => require(['../views/public/login.vue'], resolve),
		name: 'login',
		hidden: false,
	},
	{
		path: '/register',
		component: (resolve) => require(['../views/public/register.vue'], resolve),
		name: '注册',
		hidden: false,
	},
	{
		path: '/termsofservice',
		component: (resolve) => require(['../views/public/termsofservice.vue'], resolve),
		name: '注册协议',
		hidden: false,
	},
	{
		path: '/bindPhone',
		component: (resolve) => require(['../views/public/bindPhone.vue'], resolve),
		name: '绑定手机号',
		hidden: false,
	},
	{
		path: '/forgetpass',
		component: (resolve) => require(['../views/public/forgetpass.vue'], resolve),
		name: '找回密码',
		hidden: false,
	},
	{
		path: '/realName',
		component: (resolve) => require(['../views/public/realName.vue'], resolve),
		name: 'realName',
		hidden: false,
	},
	{
		path: '/',
		redirect: '/train',
		component: Home,
		hidden: false,
		children: [
			{
				path: '/train',
				component: (resolve) => require(['../views/index/train/train.vue'], resolve),
				name: 'train',//火车首页
				meta: {
					xtab: true,
					xheader: true,
					xtitle: false,
					xpage: 2,
					xclass: 'train'
				},
				hidden: false,
			},
			{
				path: '/train/trainlist',
				component: (resolve) => require(['../views/index/train/trainlist.vue'], resolve),
				name: 'trainList',//火车列表
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: 'train'
				},
				hidden: false,
			},
			{
				path: '/train/city',
				component: (resolve) => require(['../views/index/train/city.vue'], resolve),
				name: 'trainCity',//火车城市
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/date',
				component: (resolve) => require(['../views/index/train/date.vue'], resolve),
				name: 'trainDate',//火车日历
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainSeat',
				component: (resolve) => require(['../views/index/train/trainSeat.vue'], resolve),
				name: 'trainSeat',//火车坐席
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainTime',
				component: (resolve) => require(['../views/index/train/trainTime.vue'], resolve),
				name: 'trainTime',//火车时刻表
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/section',
				component: (resolve) => require(['../views/index/train/section.vue'], resolve),
				name: 'section',//区间查询
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/fillOrder',
				component: (resolve) => require(['../views/index/train/fillOrder.vue'], resolve),
				name: 'fillOrder',//订单填写
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/reserve',
				component: (resolve) => require(['../views/index/train/reserve.vue'], resolve),
				name: 'reserve',//预定须知
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainLogin',
				component: (resolve) => require(['../views/index/train/trainLogin.vue'], resolve),
				name: 'trainLogin',//12306登录
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainPassenger',
				component: (resolve) => require(['../views/index/train/trainPassenger.vue'], resolve),
				name: 'trainPassenger',//乘客
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/operatePassenger',
				component: (resolve) => require(['../views/index/train/operatePassenger.vue'], resolve),
				name: 'operatePassenger',//添加编辑乘客
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainGetList',
				component: (resolve) => require(['../views/index/train/trainGetList.vue'], resolve),
				name: 'trainGetList',//学生票城市学校
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainCoupon',
				component: (resolve) => require(['../views/index/train/trainCoupon.vue'], resolve),
				name: 'trainCoupon',//火车优惠券
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainInsurance',
				component: (resolve) => require(['../views/index/train/trainInsurance.vue'], resolve),
				name: 'trainInsurance',//火车行程保险
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainInsuranceTip',
				component: (resolve) => require(['../views/index/train/trainInsuranceTip.vue'], resolve),
				name: 'trainInsuranceTip',//火车行程保险提示
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainServer',
				component: (resolve) => require(['../views/index/train/trainServer.vue'], resolve),
				name: 'trainServer',//火车行程保险
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainAlternative',
				component: (resolve) => require(['../views/index/train/trainAlternative.vue'], resolve),
				name: 'trainAlternative',//备选车次
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainOccupyingSeat',
				component: (resolve) => require(['../views/index/train/trainOccupyingSeat.vue'], resolve),
				name: 'trainOccupyingSeat',//占座页面
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainPay',
				component: (resolve) => require(['../views/index/train/trainPay.vue'], resolve),
				name: 'trainPay',//火车支付
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainOrderDetail',
				component: (resolve) => require(['../views/index/train/trainOrderDetail.vue'], resolve),
				name: 'trainOrderDetail',//火车订单详情
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainChange',
				component: (resolve) => require(['../views/index/train/trainChange.vue'], resolve),
				name: 'trainChange',//火车改签页
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainChangeFillOrder',
				component: (resolve) => require(['../views/index/train/trainChangeFillOrder.vue'], resolve),
				name: 'trainChangeFillOrder',//火车改签订单填写页
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainFinish',
				component: (resolve) => require(['../views/index/train/trainFinish.vue'], resolve),
				name: 'trainFinish',//支付完成
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainRobFinish',
				component: (resolve) => require(['../views/index/train/trainRobFinish.vue'], resolve),
				name: 'trainRobFinish',//抢票支付完成
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/train/trainRobShare',
				component: (resolve) => require(['../views/index/train/trainRobShare.vue'], resolve),
				name: 'trainRobShare',//好友分享加速抢票
				meta: {
					xtab: false,
					xheader: false,
					xtitle: false,
					xpage: 2,
					xclass: ''
				},
				hidden: false,
			},
			{
				path: '/my',
				component: MyPage,
				hidden: false,
				children: [{
						path: '/my',
						component: (resolve) => require(['../views/my/my.vue'], resolve),
						name: '个人中心',
						meta: {
							xtab: true,
							xheader: false,
							title: '个人中心',
							xpage: 1
						},
						hidden: false,
					},
					{
						path: '/my/order',
						component: (resolve) => require(['../views/my/order/order.vue'], resolve),
						name: 'allOrder',
						meta: {
							xtab: true,
							xheader: false,
							xtitle: true,
							title: '全部订单',
							xpage: 2,
							xclass: 'white'
						},
						hidden: false,
					},
					{
						path: '/my/modifyCard',
						component: (resolve) => require(['../views/my/set/modifyCard.vue'], resolve),
						name: '实名认证',
						meta: {
							xtab: false,
							xheader: true,
							xtitle: true,
							title: '实名认证',
							xpage: 2,
							xclass: 'white'
						},
						hidden: false,
					},
					{
						path: '/my/coupon',
						component: (resolve) => require(['../views/my/coupon/coupon.vue'], resolve),
						name: '我的优惠券',
						meta: {
							xtab: false,
							xheader: true,
							xtitle: true,
							title: '优惠券',
							xpage: 2,
							xclass: 'white-border coupon'
						},
						hidden: false,
					},
					{
						path: '/my/coupon/couponList',
						component: (resolve) => require(['../views/my/coupon/couponList.vue'], resolve),
						name: '我的优惠券',
						meta: {
							xtab: false,
							xheader: true,
							xtitle: true,
							title: '我的优惠券',
							xpage: 2,
							xclass: 'getcoupon'
						},
						hidden: false,
					},
					{
						path: '/my/coupon/getcoupon',
						component: (resolve) => require(['../views/my/coupon/getcoupon.vue'], resolve),
						name: '领券中心',
						meta: {
							xtab: false,
							xheader: true,
							xtitle: true,
							title: '领券中心',
							xpage: 2,
							xclass: 'getcoupon'
						},
						hidden: false,
					},
					{
						path: '/my/wallet',
						component: (resolve) => require(['../views/my/wallet/wallet.vue'], resolve),
						name: '我的钱包',
						meta: {
							xtab: false,
							xheader: true,
							xtitle: true,
							title: '我的钱包',
							xpage: 2,
							xclass: 'transparent wallet'
						},
						hidden: false,
					},
					{
						path: '/my/rpb',
						component: (resolve) => require(['../views/my/rpb/rpb.vue'], resolve),
						name: '我的红包',
						meta: {
							xtab: false,
							xheader: true,
							xtitle: true,
							title: '我的红包',
							xpage: 2,
							xclass: ' white'
						},
						hidden: false,
					},
					{
						path: '/my/rpb/rpblist',
						component: (resolve) => require(['../views/my/rpb/rpblist.vue'], resolve),
						name: '红包明细',
						meta: {
							xtab: false,
							xheader: true,
							xtitle: true,
							title: '红包明细',
							xpage: 2,
							xclass: ' white'
						},
						hidden: false,
					},
				]
			}
		]
	}
];
export default routes;
